]> dgit.raspbian.org Git - gnome-shell.git/commit
keyboardManager: Update layout index before keymap
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 23 Oct 2025 18:56:10 +0000 (20:56 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 28 Oct 2025 18:44:05 +0000 (18:44 +0000)
commitf643915b32fbc116ec09572276af645300589764
tree589755d69c4662f85177a22b09b9fb65bd0313cb
parent4900aad2deab7398e69b1a57a38285fa73974c0f
keyboardManager: Update layout index before keymap

Unfortunately, layouts and keymaps are not considered atomic data
even though they are closely related. Furthermore, these are async
operations that are not immediate to apply, and each of them result
in a plethora of updates down in Mutter (layout group being a subset
of keymaps).

Doing things in the current order, these updates do result in a
feedback loop, since the layout index is not changed altogether with
the keymap, but the keymap update is also seen as a layout change.

Even though it still does result in unnecessary intermediate updates,
changing the layout index first avoids the feedback loop, since it
will already match with the expectations after the ClutterKeymap is
updated.

This fixes deadlocked shell when using xkb options that trigger layout
changes through the ISO_Next_Group key emission, when the group change
also triggered a keymap update (e.g. moving to a different group
per KeyboardManager.MAX_LAYOUTS_PER_GROUP limits).

This does not fix being able to switch between all layouts, when
there is more than one group. This will be fixed in later commits.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8738
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3930>
js/misc/keyboardManager.js